<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>优菜商城</title>
		<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport" />
		<meta content="yes" name="apple-mobile-web-app-capable" />
		<meta content="black" name="apple-mobile-web-app-status-bar-style" />
		<meta content="telephone=no" name="format-detection" />
		<meta name="author" content="@binggan" />
		<link rel="stylesheet" href="css/ydui.css" />
		<link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_463779_pkv3jpw5yz1fko6r.css" />
		<link rel="stylesheet" type="text/css" href="css/swiper.min.css" />
		<link rel="stylesheet" type="text/css" href="css/common.css" />
		<link rel="stylesheet" type="text/css" href="css/index.css" />
		<script src="js/flexible.js"></script>
	</head>

	<body>
		<section class="g-flexview">
			<header class="m-navbar index-navbar search-navbar">
				<div class="navbar-item area back">
					<i class="back-ico back"></i>
				</div>
				<div class="navbar-center navbar-search">
					<i class="iconfont icon-search3"></i>
					<input type="text" name="" id="index-search" class="search-input" placeholder="搜索关键字" />
				</div>
				<div class="navbar-item area search-btn">
					搜索
				</div>
			</header>
			<div class="g-scrollview">
				<p class="page-search-tit">热门搜索</p>
				<div class="sep-items white-bg hot-search-box">
					<span class="serach-label">牛排</span>
					<span class="serach-label">进口水果</span>
					<span class="serach-label">阳澄湖大闸蟹</span>
					<span class="serach-label">羊蝎子</span>
					<span class="serach-label">梁子湖大龙虾</span>
				</div>
				<!--历史搜索-->
				<div class="search-his-box">
					<p class="page-search-tit">历史搜索</p>
					<ul class="white-bg search-history">
						<li class="border-bot">牛排</li>
						<li class="border-bot">进口水果</li>
						<li class="border-bot">梁子湖大龙虾</li>
						<li class="border-bot">羊蝎子</li>
					</ul>
					<span class="clear-history white-bg">清除历史记录</span>
				</div>
				
			</div>
		</section>
		<script src="js/jquery.min.js"></script>
		<script src="js/ydui.js"></script>
		<script src="js/common.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			var $clearHis=$(".clear-history"),
				$history=$(".search-his-box"),
				$searchBtn=$(".search-btn");
				
			//搜索触发事件
			$searchBtn.on('click',function(){
				var searchWords=$("#index-search").val();
				$.ajax({
					type:"post",
					url:'',
					data:{searchwords:searchWords},
					success:function(res){
						
					}
				});
			});
			
			//清除历史记录
			$clearHis.on('click',function(){
				$.ajax({
					type:'post',
					url:'',
					success:function(){
						
						$history.remove();
					}
				})
				//$history.remove();
			})
		</script>
	</body>

</html>